#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QListWidgetItem>
#include <QtWebKit/QtWebKit>
#include <vlc/vlc.h>

namespace Ui {
    class MainWindow;
}

class MainWindow : public QMainWindow {
    Q_OBJECT
public:
    MainWindow(QWidget *parent = 0);
    ~MainWindow();

protected:
    void changeEvent(QEvent *e);

private:
    Ui::MainWindow *ui;

    void PlayerStop();
    void PlayerPlay(QString url,QString text);
    void PlayerChangeVolume( int volume );

    virtual void mouseMoveEvent( QMouseEvent * );

private:

    QNetworkAccessManager *manager;

    //variables propres a VLC

    libvlc_exception_t _vlcexcep;
    libvlc_instance_t *_vlcinstance;
    libvlc_media_player_t *player;
    libvlc_media_t *media;

    bool desinterlace_on;
    int TimerCount;
    bool HidedRemote;

private slots:
    void on_checkBox_Mute_clicked();
    void on_pushButton_Hide_clicked();
    void on_horizontalSlider_valueChanged(int value);
    void on_horizontalSlider_sliderMoved(int position);
    void on_checkBox_Desinterlace_stateChanged(int );
    void on_listWidget_itemDoubleClicked(QListWidgetItem* item);
    void replyFinished(QNetworkReply* Reply);

protected slots:
  virtual void TimerTimeout();
};

#endif // MAINWINDOW_H
